CC = g++
CFLAGS = -g -I$(HOME)/include -O3

ALL =		shsc/avg		\
		jerasure/avg		\
		jerasure/makefile	\
		jerasure2/avg		\
		jerasure2/makefile	\
		nostatic/avg		\
		nostatic/makefile	\
		static/avg		\
		static/makefile		\
		split_hier/avg		\
		split_hier/makefile

all: $(ALL)

clean:
	rm -f core *.o $(ALL) a.out avg

shsc/avg: 
	g++ -o shsc/avg shsc/avg.cpp ; cp shsc/avg .

jerasure/avg: shsc/avg
	rm -f jerasure/avg ; cp shsc/avg jerasure

jerasure/makefile: shsc/makefile
	rm -f jerasure/makefile ; cp shsc/makefile jerasure

jerasure2/avg: shsc/avg
	rm -f jerasure2/avg ; cp shsc/avg jerasure2

jerasure2/makefile: shsc/makefile
	rm -f jerasure2/makefile ; cp shsc/makefile jerasure2

nostatic/avg: shsc/avg
	rm -f nostatic/avg ; cp shsc/avg nostatic

nostatic/makefile: shsc/makefile
	rm -f nostatic/makefile ; cp shsc/makefile nostatic

static/avg: shsc/avg
	rm -f static/avg ; cp shsc/avg static

static/makefile: shsc/makefile
	rm -f static/makefile ; cp shsc/makefile static

split_hier/avg: shsc/avg
	rm -f split_hier/avg ; cp shsc/avg split_hier

split_hier/makefile: shsc/makefile
	rm -f split_hier/makefile ; cp shsc/makefile split_hier
